#ifndef _ENTITY_WAYPOINTS_H_
#define _ENTITY_WAYPOINTS_H_

#include "../CASF/CDSF_Types.h"

#define kWaypointNameMaxLength	10


typedef enum {
	DirectionEast,
	DirectionWest,
}LongitudeDirection;

typedef enum {
	DirectionNorth,
	DirectionSouth,
}LatitudeDirection;

typedef struct {
	UT16 degree;
	UT16 minute;
	UT16 second;
}AngleSegment;

typedef struct {
	LongitudeDirection direction;
	AngleSegment angle;
}Longitude;

typedef struct {
	LatitudeDirection direction;
	AngleSegment angle;
}Latitude;

typedef struct {
	Longitude longitude;
	Latitude latitude;
	float altitude;
}Coordinate;

typedef struct {
	bool valid;
	char name[kWaypointNameMaxLength+1];
	Coordinate position;
}Waypoint;

extern int WaypointsCount(void);

extern int WaypointsGetToPointIndex(void);
extern void WaypointsSetToPointIndex(int index);

extern Waypoint WaypointsGet(int index);
extern bool WaypointsCanSet(int index);
extern void WaypointsSet(int index, Waypoint wp);
extern void WaypointsInvalidate(int index);
extern void WaypointsRemove(int index);

extern bool WaypointsIsModified(void);
extern void WaypointsResetModified(void);


#endif